/*
package com.practice.bootdemo.controller;

import com.dto.ResponseDto;
import com.practice.bootdemo.common.JWTUtil;
import com.practice.bootdemo.vo.UserTokenVo;
import com.util.ResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(value="登录controller",tags={"登录接口"})
@RequestMapping(value = "user")
public class LoginController {

    @ApiOperation(value = "登录",httpMethod = "POST" )
    @RequestMapping(value = "login" ,method = RequestMethod.POST)
    public ResponseDto<UserTokenVo> login(String staffCode, String engName){
        //验证密码
        String token= JWTUtil.generateToken(engName,"jwtTest",30*60*1000);
        JWTUtil.parseToken(token);
        UserTokenVo userVo=new UserTokenVo();
        userVo.setEngName(engName);
        userVo.setStaffCode(staffCode);
        userVo.setToken(token);
        return ResponseUtil.success(userVo);
    }

}
*/
